package top.fyukina.fymil;

import java.util.List;
import java.util.Map;

public interface Registrable<K, T extends RegName<K>> {
    default void register(List<T> registries) {
        registries.forEach(r -> getLib().put(r.registerName(), r));
    };
    Map<K, T> getLib();
    default T get(K name) {
        return getLib().get(name);
    }
}